package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class UserInfo {
    /**
     * 用户信息编号
     */
    private int uiId;
    /**
     * 用户姓名
     */
    private String uiName;
    /**
     * 用户年龄
     */
    private int age;
    /**
     * 用户性别
     */
    private String sex;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 用户邮箱
     */
    private String email;
    /**
     * 简介
     */
    private String userInfo;
    /**
     * 所属公司
     */
    private String company;
    /**
     * 连接用户表（外键）
     */
    private int uId;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;

    // 构造方法
    public UserInfo() {}
    public UserInfo(int uiId, String uiName, int age, String sex, String phone, String email, String info, String company, int u_id, Date createTime, int state) {
        this.uiId = uiId;
        this.uiName = uiName;
        this.age = age;
        this.sex = sex;
        this.phone = phone;
        this.email = email;
        this.userInfo = info;
        this.company = company;
        this.uId = u_id;
        this.createTime = createTime;
        this.state = state;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("uiId","u_id");
        map.put("uiName","ui_name");
        map.put("age","age");
        map.put("sex","sex");
        map.put("phone","phone");
        map.put("email","email");
        map.put("info","info");
        map.put("company","company");
        map.put("uId","u_id");
        map.put("createTime","create_time");
        map.put("state","state");
        return map;
    }

    // 属性
    public int getUiId() {
        return uiId;
    }

    public void setUiId(int uiId) {
        this.uiId = uiId;
    }

    public String getUiName() {
        return uiName;
    }

    public void setUiName(String uiName) {
        this.uiName = uiName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(String Info) {
        this.userInfo = Info;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public int getUId() {
        return uId;
    }

    public void setUId(int u_id) {
        this.uId = u_id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    /**
     * 打印用户信息
     * @return
     */
    @Override
    public String toString() {
        return "UserInfo{" +
                "uiId=" + uiId +
                ", uiName='" + uiName + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", userInfo='" + userInfo + '\'' +
                ", company='" + company + '\'' +
                ", uId=" + uId +
                ", createTime=" + createTime +
                ", state=" + state +
                '}';
    }
}
